package com.info33.platform.business.app.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.info33.platform.business.app.entity.AppRoleUser;
import com.info33.platform.business.app.vo.AppRoleUserVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * @author admin
 */
@Repository
public interface AppRoleUserDao extends BaseMapper<AppRoleUser> {

    /**
     * 校验新切换的主角色
     *
     * @param id-
     * @return -
     */
    AppRoleUserVO checkPrincipal(@Param("id") Long id);

    /**
     * 获取某用户 app 身份信息
     *
     * @param uid app 租户用户 id
     * @return vo
     */
    AppRoleUserVO getRoleInfoByUid(@Param("uid") Long uid);
}